import { createApp } from 'vue'
// 引入全局样式
import './styles/global.css';
import router from "./router/index";
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import ElementPlus from 'element-plus'

// import {
//     Grid,
//     User,
//     Document,
//     ChatDotRound,
//     Star,
//     Setting,
//     Logout,
// } from '@element-plus/icons-vue';
import locale from 'element-plus/es/locale/lang/zh-cn'
// import './style.css'
import My from './App.vue'
import {createPinia} from "pinia";
// import {ElementPlus} from "@element-plus/icons-vue";  //导入 createPinia

const vueApp = createApp(My);
const pinia = createPinia(); //创建pinia实例

vueApp.use(router); //让vue对象启动路由
vueApp.use(pinia);

vueApp.use(ElementPlus,{locale})
vueApp.mount('#app') //挂载
// createApp(My).mount('#app')

//注册ElementPlus小图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    vueApp.component(key, component)
}





